Context
Type theory
Equality and Equivalence
equivalence
-
equality (definitional, propositional, computational, judgemental, extensional, intensional, decidable)
-
identity type, equivalence of types, definitional isomorphism
-
isomorphism, weak equivalence, homotopy equivalence, weak homotopy equivalence, equivalence in an (∞,1)-category
-
natural equivalence, natural isomorphism
-
gauge equivalence
-
Examples.
principle of equivalence
equation
-
fiber product, pullback
-
homotopy pullback
-
Examples.
-
linear equation, differential equation, ordinary differential equation, critical locus
-
Euler-Lagrange equation, Einstein equation, wave equation
-
Schrödinger equation, Knizhnik-Zamolodchikov equation, Maurer-Cartan equation, quantum master equation, Euler-Arnold equation, Fuchsian equation, Fokker-Planck equation, Lax equation
Contents
Idea
In any predicate logic over type theory, propositional equality is the notion of equality which is defined to be a proposition. Propositional equality is most commonly used in set theories like ZFC and ETCS, but it could also be used for definitional equality and conversional equality in some presentations of dependent type theories like Martin-Löf type theory or cubical type theory in place of judgmental equality.
Propositional equality can be contrasted with judgmental equality, where equality is a judgment, and typal equality, where equality is a type.
Note on terminology
Historically in the dependent type theory community, the term propositional equality was used for typal equality. This was because under the principle of propositions as types, one interprets all types in a single-layer type theory as being propositions. However, we choose to make a distinction between propositional equality and typal equality. First, propositional equality as defined in this article is used in the most common foundations of mathematics, such as ZFC and ETCS, and is clearly not a type. Additionally, in some logics over type theory, one can have three distinct notions of equality: judgmental equality, propositional equality, and typal equality. Finally, in the advent of homotopy type theory and other type theoretic higher foundations, typal equality is no longer required to be a subsingleton or h-proposition, and the alternative principle of propositions as some types has become the primary interpretation of dependent type theory, where only the subsingletons or h-propositions are interpreted as propositions.
Definition
Typed first-order logic
In any two-layer type theory with a layer of types and a layer of propositions, or equivalently a first order logic over type theory or a first-order theory, every type has a binary relation according to which two elements and of are related if and only if they are equal; in this case we write . Since relations are propositions in the context of a term variable judgment in the type layer, this is called propositional equality. The formation and introduction rules for propositional equality is as follows
Then we have the elimination rules for propositional equality:
Untyped first-order logic
Something similar occurs in untyped first-order logic, where the domain of discourse has a binary relation according to which two elements and are related if and only if they are equal; in this case we write . Since relations are propositions in the context of a term variable judgment in the type layer, this is similarly called propositional equality. The formation and introduction rules for propositional equality is as follows
Then we have the elimination rules for propositional equality:
Properties
Propositional equality is an equivalence relation
The introduction rule of propositional equality says that propositional equality is reflexive.
We can show that heterogeneous equality is symmetric, that for all and such that , we have . By the introduction rule, we have that for all , we have that , and because all propositions imply themselves, we have that implies . Thus, by the elimination rules for heterogeneous equality, for all and such that , we have .
We can also show that heterogeneous equality is transitive, that for all , , and such that , implies that . By the introduction rule, we have that for all and , we have that , and because all propositions imply themselves, we have that implies , and because true propositions imply true propositions, we have that implies that implies . Thus, by the elimination rules for heterogeneous equality, for all , , and such that , implies that .
Thus, heterogeneous equality is an equivalence relation.
Functions are extensional
For all function and elements and such that , :
This is because for all functions , by the introduction rule for propositional equality, for all elements , , and the elimination rule for propositional equality states that if for all elements , , then for all elements and such that , .
Function extensionality
The extensionality principle for function types (function extensionality) states that for all functions and , if and only if for all and such that ,
Relation to heterogeneous propositional equality
Given elements and such that and and , heterogeneous propositional equality is given by the relation . Given elements , and for all and , if and only if
This is because by the introduction rules of propositional equality and heterogeneous propositional equality, we have that for all , and , and since true propositions imply true propositions, we have implies and implies . By the elimination rules for propositional equality, for all and , we have implies , and by the elimination rules for heterogeneous propositional equality, we have implies . Thus, if and only if .
Transport and the principle of substitution
The analogue of identity functions on a type , a function such that for all elements , is the notion of transport functions between a family of types indexed by elements .
Given elements and such that , a transport function is a function such that for all ,
These transport functions, if they exist, are unique up to equality. Suppose we have a second function such that implies that for all , . Then by symmetry and transitivity of heterogeneous equality, we have , which is logically equivalent to . Then by function extensionality, we have , which implies that transport functions, if they exist, are unique up to equality.
Suppose that for all elements and such that , there exists a transport function . Then for all and , if and only if
In particular, this means that we have , and by the fact that functions preserve equality, , which by transitivity of propositional equality implies that . Similarly, we have , which by transitivity of propositional equality implies that . Thus, the transport functions and are inverse functions of each other, and thus both transport functions are bijections, and could be written as and respectively.
Thus, provided that transport functions exist, we have the following derivable rules for the principle of substitution of propositionally equal terms:
In computation and uniqueness rules
Propositional equality can be used in the computation rules and uniqueness rules of types in dependent type theory:
- Computation rules for dependent product types:
- Uniqueness rules for dependent product types:
- Computation rules for negative dependent sum types:
- Uniqueness rules for negative dependent sum types:
- Computation rules for identity types:
See also